package com.zzq.guli.service.edu.controller.api;

import com.zzq.guli.service.base.result.R;
import com.zzq.guli.service.edu.entity.SubjectVo;
import com.zzq.guli.service.edu.service.SubjectService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;

//@CrossOrigin
@RequestMapping("/api/edu/subject")
@RestController
public class ApiSubjectController {



    @Autowired
    SubjectService subjectService;

    @GetMapping("getSubject")
    public R getNestedTreeList(){

        List<SubjectVo> subjectVoList= subjectService.getNestedTreeList();

        return R.ok().data("subjectVolist",subjectVoList);
    }

}
